package mindteck.store;

public class Order {
	private OrderBean orderBean;
	private OrderDetail orderDetail;
	
	public Order(){
		
	}
	
	public Order(OrderBean orderBean){
		this.orderBean = orderBean;
	}
	
	
	public void setOrderBean(OrderBean orderBean){
		this.orderBean = orderBean;
	}
	
	public void setOrderDetail(OrderDetail orderDetail){
		this.orderDetail = orderDetail;
	}
	
	public OrderBean getOrderBean(){
		return orderBean;
	}
	
	/*Place order with OrderDAOjbect and detail of order with orderdetailDAO*/
	public void placeOrder(OrderDAO orderDAO, OrderDetailDAO orderDetailDAO){
		if(orderDetail != null && orderBean != null){
		orderDAO.insertOrderInfo(orderBean);
		orderDetailDAO.insertOrderDetail(orderDetail);
		}
	}
	

}
